/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package generator.connection;

import java.util.Objects;

/**
 *
 * @author Aleksandar
 */
public class DataBaseConnectionModel{
    public int id;
    public String dbType;
    public String dbDriver;
    public int active;
    public String dbName;
    public String dbUser;
    public String dbPassword;
    public String dbPort;
    public String jdbcURL;

    public DataBaseConnectionModel(int id, String dbType, String dbDriver, int active, String dbName, String dbUser, String dbPassword, String dbPort, String jdbcURL) {
        this.id = id;
        this.dbType = dbType;
        this.dbDriver = dbDriver;
        this.active = active;
        this.dbName = dbName;
        this.dbUser = dbUser;
        this.dbPassword = dbPassword;
        this.dbPort = dbPort;
        this.jdbcURL = jdbcURL;
    }

    @Override
    public String toString() {
        return dbType + " [" + dbDriver + "]";
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 37 * hash + this.id;
        hash = 37 * hash + Objects.hashCode(this.dbDriver);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final DataBaseConnectionModel other = (DataBaseConnectionModel) obj;
        if (this.id != other.id) {
            return false;
        }
        if (!Objects.equals(this.dbDriver, other.dbDriver)) {
            return false;
        }
        return true;
    }

}